﻿package {
	import flash.display.*;
	import flash.events.*;
	public class T2 extends MovieClip {
		var cc:CardControl;
		var cc2:CardControl;
		
		public function T2()  {
			cc = new CardControl(this);			
			cc.x = 100;
			cc.y = 200;
			cc2 = new CardControl(this);			
			cc2.x = 100;
			cc2.y = 0;
			cc2.UserMode = false;
			addChild(cc);
			addChild(cc2);
			btn.addEventListener(MouseEvent.CLICK, cardClicked);
			outCardBtn.addEventListener(MouseEvent.CLICK, outCard);
		}
		
		private function outCard(event:MouseEvent) {
			var cd = cc.outCard();
			trace(cd);
			cc2.setCardData(cd);
		}
		
		private function cardClicked(event:MouseEvent) {
			trace("hello");
			cc.setCardData([0x01,0x04,0x15,0x4E,0x4F,0x24,0x3D]);
		}
	}
}